Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes DOCS-1666
Problem
Nothing measures whether the Generating Types guide leads an agent to types that match the local database. A typed app breaks when its types miss part of the database. A second schema drops out of the types file, or a database function stays typed as
never.Evidence:
--schema public. Generating TypeScript types from CLI for custom schema incorrectly uses public schema typings cli#3536, #3272, #3146 and #3061 report the same gap.NeverType Found insupabase.rpcsupabase#40215:supabase.rpc()is typed asneveruntil types are generated.TypeError. That example is outside the page's markdown variant, so this eval cannot exercise it.Docs finding, checked by hand on the pinned CLI 2.117.0:
npx supabase gen types typescript > database.types.ts, exits 1 with "Must specify one of --local, --linked, --project-id, or --db-url". It writes that error into the types file.--remote, used in the page's hosted, self-hosted andupdate-typescommands, is "Unrecognized flag".evals/cli/build-database-006-regenerate-typesoverlaps in part. Its subject is the agent across CLI versions, and it has no second schema, no function and no refresh after a change. The README says how the two differ.Sources reached: Linear, Slack, supabase/supabase, supabase/cli and agent-skills issues, the CLI run by hand. Not reached: Hex, Supacademy. Slack had CLI team threads about type generation internals, and no user failure.
Changes
Adds
build-docs-036-generating-types. A bookshop app's TypeScript fails to compile, because its client imports database types that do not exist. The prompt asks for types that match the local database and a working refresh command. The seed puts the books table, an enum and a search function in an exposedcatalogschema, and orders inpublic. ItsCONTRIBUTING.mdnamesnpm run db:typesas the refresh command, andpackage.jsondoes not have it yet.Checks:
createClient<...>import, so types at any path pass.node_modules/.bin, runsnpm run db:types, and compiles again.Expected signal: A
--schema publiccommand copied from the page leaves outcatalogand fails the match check. Hand-written types, or the page'supdate-typesscript as written, fail the refresh check.What part of the guide this tests:
createClient<Database>Verification
pnpm exec biome check evals/docs/build-docs-036-generating-typespasses.pnpm --filter @supabase-evals/framework typecheckpasses.pnpm eval:dry -- --suite docs --eval build-docs-036-generating-typesplans one pair oncodex-gpt-6-luna-no-skills.codex-gpt-6-luna-no-skillsin therun-evals-changedrun. All three passed all four checks, including the guide read. A full-marks pass does not show the page carried the run. Braintrust run.For new or changed evals (see Submitting evals for review):
run-evals-changedlabel or the Refresh eval results workflow (suite: regressionfor framework changes), and linked the Braintrust run here.